package com.hc.tenant.listener.event;

import org.eclipse.paho.client.mqttv3.MqttMessage;

import java.util.EventObject;

public class MqttEvent extends EventObject {

    private MqttMessage mqttMessage;

    private String token;

    public MqttEvent(Object source, MqttMessage mqttMessage, String token) {
        super(source);
        this.mqttMessage = mqttMessage;
        this.token = token;
    }

    public MqttMessage getMqttMessage(){
        return mqttMessage;
    }

    public String getToken() {
        return token;
    }
}
